﻿@using Freesql.Tool.Helpers;
@using Freesql.Tool.Models;
@using System.Collections.Generic;
@{

    var gen = Model;
    var list = new List<Property>();
    var isReflection = true;
    var isEnum = false;
    var classPath = $"{gen.NameSpace}.Domain.Entities.{gen.TableName}";
    if (isReflection)
    {
        list = ReflectionHelper.GetProperties(classPath,false, out isEnum);
    }
    else
    {
        //TODO 从数据库获取列信息
    }
    var description = isReflection ? ReflectionHelper.GetDescription(classPath) : "SourceTable.Description";
}
@{
    if (isEnum)
    {
@:using @(gen.NameSpace).Common;
    }
}
using System;

namespace @(gen.NameSpace).Shared.Dtos.Out
{
    ///<summary>
    ///@(description)输出Dto
    ///</summary>
    public class @(gen.TableName)Out
    {
@{
    foreach (var item in list)
    {

        @:///<summary>
        @:@("///"+item.Description)
        @:///</summary>
        @:public @(item.Type) @(item.Name) { get; set; }
    }

}
    }
}
